Generate self signed certificate pfx file from a windows machine or virtual machine
open cmd.exe
enter powershell
and click enter
Input the following code:
$cert = New-SelfSignedCertificate -FriendlyName "Tauri Application Technologies" -CertStoreLocation Cert:\CurrentUser\My -Subject "CN=TauriAppTech" -Type CodeSigningCert
$CertPassword = ConvertTo-SecureString -String "password" -Force -AsPlainText
Export-PfxCertificate -Cert "cert:\CurrentUser\My\$($cert.Thumbprint)" -FilePath "C:\Users\<user-name>\Downloads\selfsigncert.pfx" -Password $CertPassword
Signing using osslsigncode
- install osslsigncode
sudo apt install osslsigncode
yay -S osslsigncode
- Sign executable using pre generated pfx file
osslsigncode sign -pkcs12 selfsigncert.pfx -askpass -n "tauriApp" -i http://tauri.app/ -in tauriApp-x64.msi -out tauriApp-x64-signed.msi